from app import app
from flask_cors import CORS
from comm.config import Config
from views.user import user_blue

#日志模块
import logging
from logging import FileHandler

app.config.from_object(Config)
CORS(app)

app.register_blueprint(user_blue, url_prefix="/user")


if __name__=="__main__":
    handler = logging.FileHandler("logs/"+'log.txt')
    app.logger.addHandler(handler)
    app.run()